<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>TZ-追梦</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        div{
            width: 350px;
            height: 150px;
            margin: auto;
            border: 1px dashed black;
        }
        /*浏览器窗口宽度  大于等于1200px*/
        @media screen and ( min-width: 1200px ) {
            div{
                background: purple;
            }
        }
        /* 浏览器窗口宽度  大于等于640px 小于等于1199px */
        @media screen and ( min-width: 640px ) and ( max-width: 1199px ) {
            div{
                background: greenyellow;
            }
        }
        /*浏览器窗口宽度   小于等于639*/
        @media screen and (max-width: 639px){
            div{
                background: pink;
            }
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>